package com.easyban.entity.enums;

public enum FileCategoryEnums {
    VIDEO(1,"video","视频"),
    MUSIC(2,"music","音乐"),
    IMAGE(3,"image","图片"),
    DOC(4,"doc","文档"),
    OTHERS(5,"others","其他");

    FileCategoryEnums(Integer category, String code, String desc) {
        this.category = category;
        this.code = code;
        this.desc = desc;
    }

    FileCategoryEnums() {
    }

    private Integer category;
    private String code;
    private String desc;
    public static FileCategoryEnums getBycategory(String category){
        for (FileCategoryEnums enums : FileCategoryEnums.values()) {
            if (enums.getCode().equals(category)){
                return enums;
            }
        }
        return null;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
